<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,aItemress=no">
		<title>消息详情</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
		<link rel="stylesheet" type="text/css" href="../../css/app.css" />
		<style type="text/css">
			body{
				background-color: #F5f5f5;
			}
			.ming-text-rose{
				padding-top: 1rem;
				padding-bottom: 0.45rem;
				line-height: 0.8rem;
			}
		</style>
	</head>
	<body>
		<div id="app" v-cloak="">
			<div style="padding:0 .75rem;padding-top:1rem;background-color:#fff;">
				<div style="font-size:.85rem;font-family:PingFangSC-Medium;font-weight:500;color:rgba(34,34,34,1);">
					{{info.title}}
				</div>
				<div style="font-size:.6rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(153,153,153,1);">
					{{info.add_time}}
				</div>
				<div style="margin-top:.65rem;padding-bottom:1rem;font-size:.75rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(51,51,51,1);">
					{{info.content}}
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/vue.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script>
		var vm = new Vue({
		     el:"#app",
		     data:{
		         info:{},
		         id:0
		     },
		     methods:{
		     	get_list:function(){
		     		get_data('api/Information/details',{
		     			token:$api.getStorage('token'),
		     			id:vm.id
		     		},function(ret){
							// alert(JSON.stringify(ret))
		     			if (ret.status) {
		     				vm.info = ret.data
		     				vm.read_msg()
		     			}
		     		})
		     	},
		     	read_msg:function(){
		     		get_data('api/Information/read',{
		     			token:$api.getStorage('token'),
		     			id:vm.id
		     		},function(ret){
		     			if (ret.status) {
		     				if (ret.data.unread_msg_num==0) {
		     					send_event('read_msg_all')
		     				}
		     				send_event('read_msg')
		     			}
		     		})
		     	}
		     }
		  })
		apiready = function(){
			vm.id = $api.getStorage('id')
			vm.get_list()
		}
	</script>

</html>
